package com.acme.task2;

public class GCTest {
	
	public static void main(String[] args) {
		int numberOfIterations = 1000000;
		Foo[] foos = new Foo[numberOfIterations];
		try {
			for (int i = 0; i < numberOfIterations; i++) {
				Foo foo = new Foo(i);
				foos[i] = foo;
			}
		} catch (java.lang.OutOfMemoryError exception) {
			System.out.println(exception.getClass().getName() + ": " + exception.getMessage());
			return;
		}
	}

}
